﻿namespace DecomposePrimeFactor
{
    internal class Program
    {
        static void DecomposePrime(int n)
        {
            if (n <= 1)
            {
                Console.WriteLine(n + "没有质因数");
                return;
            }
            int i = 2;
            Console.Write(n + "=");
            while (true)
            {
                if (i == n)
                {
                    Console.Write(i);
                    return;
                }
                if (n % i == 0)
                {
                    Console.Write(i + "*");
                    n /= i;
                }
                else i++;
            }

        }
        static void Main(string[] args)
        {
            Console.Write("请输入一个正整数：");
            int n = int.Parse(Console.ReadLine());
            DecomposePrime(n);
        }
    }
}
